package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;

/**
 * @Author(王思翰)
 * @Description(类的描述)员工实体类
 * @Date(创建时间) 2021/7/23 11:00
 */
public class EmployeeBean {
    /**
     * 员工id
     */
    private int id;
    /**
     * 员工姓名
     */
    private String name;
    /**
     * 员工生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;
    /**
     * 员工工资
     */
    private int money;
    /**
     * 员工所属部门
     */
    private DeptBean deptBean;

    public EmployeeBean() {
    }

    public EmployeeBean(String name, LocalDate birthday, int money, DeptBean deptBean) {
        this.name = name;
        this.birthday = birthday;
        this.money = money;
        this.deptBean = deptBean;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public DeptBean getDeptBean() {
        return deptBean;
    }

    public void setDeptBean(DeptBean deptBean) {
        this.deptBean = deptBean;
    }

    @Override
    public String toString() {
        return "EmployeeBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", birthday=" + birthday +
                ", money=" + money +
                ", deptBean=" + deptBean +
                '}';
    }
}
